package operation.visitor;

import operation.visitor.obj.FailAction;
import operation.visitor.obj.Man;
import operation.visitor.obj.PersonGroup;
import operation.visitor.obj.SuccessAction;
import operation.visitor.obj.Woman;

public class Client {
    public static void main(String[] args) {
        PersonGroup pg = new PersonGroup();
        pg.add(new Man("Tom"));
        pg.add(new Man("Jack"));
        pg.add(new Woman("Elisabeth"));

        pg.display(new SuccessAction());

        System.out.println("==============");
        pg.display(new FailAction());
    }
}